|
![](/i/fill.gif) |
gregjohn nous apporta ses lumieres en ce 18 / 05 / 2007 16:21:
> I've got a large ASCII txt file. Every row is an integer. I have forgotten
> how to get povray to read the file so that povray can use them as declared
> variables.
>
> I know I could go in and edit the file and have it say something like
> #declare My_Array[1000]={item,item...}. If I were to do that I could
> simply #include the file. But I have an application where I would be
> doing a bunch of them and would like to avoid editing every single one of
> them.
>
> thanks.
>
>
>
>
>
You can do this:
#declare My_Array[1000]={#include "Your_text_file.txt"}
It's safer to generate your file as a comma separated list, that way, a negative
value wont get substracted from the preceding one. If your file is not comma
separated, a search and replace can be done where you replace "/n" by ",".
--
Alain
-------------------------------------------------
You know you've been raytracing too long when your personal correspondence to
friends starts out with #Dear Linda =
Ken Tyler
Post a reply to this message
|
![](/i/fill.gif) |